// <com.woyouqiu.Copyright>
// --------------------------------------------------------------
// <copyright>上海有求网络科技有限公司 2015</copyright>
// <Solution>BangChuang</Solution>
// <Project>BangChuang.Core</Project>
// <FileName>Product.cs</FileName>
// <CreateTime>2017-04-16 20:22</CreateTime>
// <Author>何苗</Author>
// <Email>hemiao@woyouqiu.com</Email>
// <log date="2017-04-16 20:22" version="00001">创建</log>
// --------------------------------------------------------------
// </com.woyouqiu.Copyright>

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Abp.Domain.Entities.Auditing;

namespace Vecen.BangChuang.BangChuang.Products {

    /// <summary>
    /// 商品
    /// </summary>
    [Table("Products")]
    public class Product: FullAuditedEntity {

        /// <summary>
        /// 缩略图附件类型
        /// </summary>
        public const string ProductThumbnailAttachmentType = "ProductThumbnail";

        /// <summary>
        /// 轮播图附件类型
        /// </summary>
        public const string ProductHeaderAttachmentType = "ProductHeader";

        /// <summary>
        /// 内容附件类型
        /// </summary>
        public const string ProductContentAttachmentType = "ProductContent";

        /// <summary>
        /// 商品类别
        /// <see cref="Products.ProductType"/>
        /// </summary>
        [StringLength(32)]
        public string ProductType { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>
        [StringLength(64)]
        public string Name { get; set; }

        /// <summary>
        /// 商品描述
        /// </summary>
        [StringLength(512)]
        public string Description { get; set; }

        /// <summary>
        /// 商品介绍
        /// </summary>
        [StringLength(Int32.MaxValue)]
        public string GraphicContent { get; set; }

        /// <summary>
        /// 相关参数介绍
        /// </summary>
        [StringLength(Int32.MaxValue)]
        public string Parameters { get; set; }

        /// <summary>
        /// 分类ID
        /// </summary>
        public int? CategoryId { get; set; }


        /// <summary>
        /// 状态
        /// </summary>
        public ProductStatus Status { get; set; }

        /// <summary>
        /// 最后上架时间
        /// </summary>
        public DateTime? LastPutOnTime { get; set; }

        /// <summary>
        /// 分类全编码
        /// </summary>
        [StringLength(128)]
        public string CategoruFullCode { get; set; }

        /// <summary>
        /// 分类
        /// </summary>
        [ForeignKey(nameof(CategoryId))]
        public virtual ProductCategory Category { get; set; }

        /// <summary>
        /// 置顶序号(数字越大,权重越高)
        /// </summary>
        public int? TopNumber { get; set; }

        /// <summary>
        /// 区域ID
        /// </summary>
        public long? AreaCode { get; set; }


        /// <summary>
        /// 成本价
        /// </summary>
        public decimal CostPrice { get; set; }

        /// <summary>
        /// 出厂价
        /// </summary>
        public decimal ExFactoryPrice { get; set; }

        /// <summary>
        /// 店长价
        /// </summary>
        public decimal AgentPrice { get; set; }

        /// <summary>
        /// 学校信息
        /// </summary>
        public string UniversityName { get; set; }


        /// <summary>
        /// 学院信息
        /// </summary>
        public string CollegeName { get; set; }

        /// <summary>
        /// 团队奖励
        /// </summary>
        public decimal TeamBonus { get; set; }
    }
}